/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardHouse.people;

import cardHouse.cards.Card;
import cardHouse.cards.Hand;
import java.util.Date;

/**
 *
 * @author sam
 */
public class Player {
    private String  m_firstName;
    private String  m_lastName;
    private Date    m_birthDate;
    private Gender  m_gender;
    private int     m_playerNumber; //todo: use UUIDs
    private Hand    m_hand;
    private String  m_playerNickName;

    enum Gender{ MALE, FEMALE, ANDROGENOUS}
    
    protected void setBirthdate(Date birthdate){
        m_birthDate = birthdate;
    }
    
    public Date getBirthdate(){
        return m_birthDate;
    }

    void setFirstName(String newFirstName){
        m_firstName = newFirstName;
    }
    
    void setLastName(String newLastName){
        m_lastName = newLastName;
    }
    
    void setGender(Gender newGender){
        this.m_gender = newGender;
    }
    
    public String getFirstName(){
        return m_firstName;
    }
    
    public String getLastName(){
        return m_lastName;
    }
    
    public Gender getGender(){
        return m_gender;
    }
    
    public int getPlayerNumber(){
        return m_playerNumber;
    }
    
    public String getPlayerNickName(){
        return this.m_playerNickName;
    }
    
    public void recieveCard(Card newCard){
        m_hand.add(newCard);
    }
    
     
    public void discard(Card card) {
        m_hand.discard(card);
    }
    public void giveCard(Player player , Card card){
        player.recieveCard(m_hand.giveCard(card));
    } 
}
